home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / inventor / models / coneManip.iv next >
Encoding:
Text File  |  1994-08-02  |  944 b   |  35 lines

  1. #Inventor V2.0 ascii
  2. # Self Manipulating Cone
  3. Separator {
  4.  
  5.     # Interface for cone control
  6.     Separator {
  7.         BaseColor { rgb 1 0 0 }
  8.         DEF PROF_PT_DRAGGER Translate2Dragger {
  9.             translation 1 -1 0
  10.             translator DEF DRAG_CUBE Separator {
  11.                 Cube { width .2 height .2 depth .2 }
  12.             }
  13.             translatorActive DEF DRAG_YELLOW_CUBE Separator {
  14.                 BaseColor { rgb 1 1 0 }
  15.                 Cube { width .2 height .2 depth .2 }
  16.             }
  17.         }
  18.     }
  19.     # Cone, controlled by above dragger
  20.     Separator {
  21.         BaseColor { rgb .8 .8 .8 }
  22.         Cone {
  23.             bottomRadius = DecomposeVec3f {
  24.                 vector = USE PROF_PT_DRAGGER . translation
  25.             }
  26.             . x
  27.             height = Calculator {
  28.                 A = USE PROF_PT_DRAGGER . translation
  29.                 expression [ "oa = -2.0*A[1]" ]
  30.             }
  31.             . oa
  32.         }
  33.     }
  34. }
  35.